package com.example.xihuashoujiduan.activity

import android.content.Intent
import android.os.Bundle
import android.os.CountDownTimer
import android.util.DisplayMetrics
import android.util.Log
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.example.xihuashoujiduan.R
import com.example.xihuashoujiduan.base.BaseActivity
import com.example.xihuashoujiduan.databinding.ActivityMainBinding
import com.example.xihuashoujiduan.model.UserData
import com.example.xihuashoujiduan.viewmodel.Mainviewmodel

class MainActivity : BaseActivity<Mainviewmodel,ActivityMainBinding>(R.layout.activity_main) {
    override fun initView() {
        val metrics = DisplayMetrics()
        windowManager.defaultDisplay.getMetrics(metrics)
        val mWidth = metrics.widthPixels
        val mHeight = metrics.heightPixels
        UserData.kuan=mWidth
        UserData.gao=mHeight

        val countdownTimer = object : CountDownTimer(2000, 1000) {
            override fun onTick(millisUntilFinished: Long) {

            }

            override fun onFinish() {

                val intent=Intent(this@MainActivity,LogshowActivity::class.java)
                startActivity(intent)
            }
        }

        countdownTimer.start()



    }

    override fun dataObservese() {

    }

}